//
//  KiwipenEvent.h
//  BlueToothDemo
//
//  Created by US bike on 2017/8/29.
//  Copyright © 2017年 奇异果. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef enum : NSUInteger {
    EventTypeError = 1, //无效指令
    EventTypeButton,    //收到按键消息
    EventTypePower,     //收到电量消息
    //EventTypeLED,       //收到LED消息
    EventTypeUUID,      //收到数据
    
} EventType;


typedef enum : NSUInteger {
    EventDetailTypeVALUE_UP_BUTTON_FALLING_EDGE = 1,
    EventDetailTypeVALUE_UP_BUTTON_RISING_EDGE,
    EventDetailTypeVALUE_UP_BUTTON_SINGLE_CLICK,
    EventDetailTypeVALUE_UP_BUTTON_DOUBLE_CLICK,
    EventDetailTypeVALUE_UP_BUTTON_LONG_PRESS,
    EventDetailTypeVALUE_UP_BUTTON_LONG_RELEASE,
    
    EventDetailTypeVALUE_DOWN_BUTTON_FALLING_EDGE,
    EventDetailTypeVALUE_DOWN_BUTTON_RISING_EDGE,
    EventDetailTypeVALUE_DOWN_BUTTON_SINGLE_CLICK,
    EventDetailTypeVALUE_DOWN_BUTTON_DOUBLE_CLICK,
    EventDetailTypeVALUE_DOWN_BUTTON_LONG_PRESS,
    EventDetailTypeVALUE_DOWN_BUTTON_LONG_RELEASE,
    
    EventDetailTypeVALUE_MID_BUTTON_FALLING_EDGE,
    EventDetailTypeVALUE_MID_BUTTON_RISING_EDGE,
    EventDetailTypeVALUE_MID_BUTTON_SINGLE_CLICK,
    EventDetailTypeVALUE_MID_BUTTON_DOUBLE_CLICK,
    EventDetailTypeVALUE_MID_BUTTON_LONG_PRESS,
    EventDetailTypeVALUE_MID_BUTTON_LONG_RELEASE,
    
} EventDetailType;


@interface KiwipenEvent : NSObject

@property (nonatomic, assign, readonly) EventType eventType;

@property (nonatomic, assign, readonly) EventDetailType eventDetailType;

@property (nonatomic, strong, readonly) NSData *eventData;


- (instancetype) initWithEventData:(NSData *) data;

@end
